﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace IndiaBigSaleService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging.
    public class UserService : IUserService
    {
        public string GetData(string value)
        {
            return string.Format("You entered: {0}", value);
        }




        public string ValidateUser(string username, string password)
        {
            UserDetails dt = new UserDetails();
            dt.UserName = username;
            dt.Password = password;
            dt.IsValidUser();
            System.Web.Script.Serialization.JavaScriptSerializer oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();

            return oSerializer.Serialize(dt);
        }
    }
}
